<template>
  <div class="box">
    <div class="main">
      <div
        v-for="(item, index) in list"
        :key="index"
        class="d1"
        @click="toDetail(item.rid)"
      >
        <img :src="item.logo" />
        <p>{{ item.name }}</p>
      </div>
    </div>
  </div>
</template>

<script>
import Plist from "./../../static/Partition.json";
export default {
  data() {
    return {
      list: [],
    };
  },
  onShow() {
    this.list = Plist.data;
  },
  methods: {
    toDetail(rid) {
      uni.navigateTo({
        url: "../PartitionDetails/PartitionDetails?rid=" + rid,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
//图标
.box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  .main {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    .d1 {
      width: 180rpx;
      height: 180rpx;
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      img {
        width: 80rpx;
        height: 80rpx;
      }
      p {
        font-size: 26rpx;
      }
    }
  }
}
</style>
